home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1990 / Nov 90 / MacApp.Tech$ 11⁄23⁄90 / 2400-A Sybase-MacApp Tip-Nov90 < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.9 KB  |  56 lines  |  [TEXT/GEOL]

  1. Item    2920715                         20-Nov-90        09:59PST
  2.  
  3. From:   BBSF.DEV                        Babcock & Brown, Michael Harper,AST
  4.  
  5. To:     KRIPALU                         Kripalu Ctr, Michael A Latta,PRT
  6.  
  7. cc:     MACAPP.TECH$                    MacApp Technical
  8.  
  9. Sub:    A Sybase-MacApp Tip
  10.  
  11. In response to Mike Latta's message to Lowell Schneider:
  12.  
  13. -------- cut here ---------
  14.  
  15. Lowell Schneider:
  16.  
  17. The problem you speak of is most likely due to the need for the Sybase segments
  18. to be LOCKED and made RESIDENT.  This involves calling the MacApp routines to
  19. make the segment resident.  In Pascal the following does the trick.
  20.  
  21.    { Force the Sybase segment to be memory resident.}
  22.    sybSeg := GetSegNumber(@dbbind);
  23.    SetResidentSegment(sybSeg, TRUE);
  24.    sybSeg := GetSegNumber(@tss_open);
  25.    SetResidentSegment(sybSeg, TRUE);
  26.  
  27. [ similar text deleted]
  28.  
  29.                                             Mike Latta
  30.  
  31. -------- cut here ----------
  32.  
  33. May I point out several things:
  34.  
  35. 1)  The segment relocation is most likely your problem.  I have an alpha from
  36. Sybase (4.0.1) that solves this problem in the Sybase code.  However, if you
  37. are running TCPort, the TCP/IP segments are still running around.
  38.  
  39. Moral:  Be sure to lock down not only Sybase segments, but also any network
  40. driver segments, just to be safe.  (I guarantee that it is necessary to lock
  41. down the "TCPort" and "sockets" segments.)
  42.  
  43. 2)  The above code is one solution to segments being unloaded & relocated.
  44. Here's another, perhaps easier one to implement.
  45.  
  46. Create a "res!" resource in your application that contains the names of the
  47. segments which you would like to remain resident.  I have gleaned from the
  48. MacApp source code that any segments whose name resides in such a resource is
  49. immune to MacApp's UnloadAllSegments.  I've tried this and it works great.
  50.  
  51. Michael J. Harper
  52. Senior Software Developer
  53. Babcock & Brown, Inc.
  54. BBSF.DEV
  55.  
  56.